import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { CustomFlowNodeService } from './custom-flow-node.service';
import { CreateCustomFlowNodeDto } from './dto/create-custom-flow-node.dto';
import { UpdateCustomFlowNodeDto } from './dto/update-custom-flow-node.dto';

@Controller('custom-flow-node')
export class CustomFlowNodeController {
  constructor(private readonly customFlowNodeService: CustomFlowNodeService) { }

  @Post()
  create(@Body() createCustomFlowNodeDto: CreateCustomFlowNodeDto) {
    return this.customFlowNodeService.create(createCustomFlowNodeDto);
  }

  @Get()
  findAll() {
    return this.customFlowNodeService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.customFlowNodeService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateCustomFlowNodeDto: UpdateCustomFlowNodeDto) {
    return this.customFlowNodeService.update(+id, updateCustomFlowNodeDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.customFlowNodeService.remove(id);
  }
}
